home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga GIGA Graphic
/
Amiga GIGA Graphic CDs 1-4 (1994)(Geuther)(Disc 4 of 4)[!].iso
/
rush
/
scripts
/
diff.rexx
next >
Wrap
OS/2 REXX Batch file
|
1994-11-23
|
706b
|
40 lines
/*
** $VER: diff.rexx 37.1 (6.6.93)
**
** Diff source file and dest file of the same name.
**
** Written by Douglas Keller
*/
options results
address command
parse arg srcfile destdir .
if file == "" then do
say "Usage: diff <filename> <dest directory>"
exit 10
end
/* rush sends filenames quoted so strip spaces and quotes */
srcfile= strip(srcfile,b,'"')
pos=lastpos(":",srcfile)
if pos == 0 then do
pos=lastpos("/",srcfile)
end
pos = pos + 1
fileonly= substr(srcfile,pos)
if destdir == "" || right(destdir, 1) == ":" then
destfile= destdir || fileonly
else
destfile= destdir || '/' || fileonly
cmdline = 'diff "' || srcfile || '" "' || destfile || '"'
address command cmdline
exit rc